package com.ciaojian.worker.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.PreDestroy;

/**
 * @author Atlakyn
 */
@Slf4j
@Component
public class ApplicationRunDestroyImpl implements ApplicationRunner {

    @Override
    public void run(ApplicationArguments args) {
        log.info("**********潮剪发型师端启动成功**********");
        System.out.println("**********潮剪发型师端启动成功**********");
    }

    @PreDestroy
    public void destroy() {
        log.info("**********潮剪发型师端停止成功**********");
        System.out.println("**********潮剪发型师端停止成功**********");
    }

}
